home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Mac Game Programming Gurus / TricksOfTheMacGameProgrammingGurus.iso / More Source / Pascal / AntiAlias / anti.p next >
Text File  |  1995-06-15  |  815b  |  46 lines

  1. {See antialias.p for comments.}
  2.  
  3. program anti;
  4.     uses
  5. {$IFC UNDEFINED THINK_PASCAL}
  6.         Types, QuickDraw, Events, Menus, Dialogs, Fonts, Resources, Devices,
  7. {$ENDC}
  8.         AntiAlias;
  9.  
  10.     var
  11.         rBounds: Rect;
  12.         wind: WindowPtr;
  13.  
  14.     procedure InitMacintosh;
  15.     begin
  16. {$IFC UNDEFINED THINK_PASCAL}
  17.         MaxApplZone;
  18.  
  19.         InitGraf(@qd.thePort);
  20.         InitFonts;
  21.         FlushEvents(everyEvent, 0);
  22.         InitWindows;
  23.         InitMenus;
  24.         TEInit;
  25.         InitDialogs(nil);
  26. {$ENDC}
  27.         InitCursor;
  28.     end; {InitMacintosh}
  29.  
  30. begin
  31.     InitMacintosh;
  32.     
  33.     SetRect(rBounds, 50, 50, 400, 150);
  34.     wind := NewCWindow(nil, rBounds, 'AntiAliasTest', true, plainDBox, WindowPtr(-1), false, 0);
  35.     SetPort(wind);
  36.  
  37.     TextSize(48);
  38.     MoveTo(10, 40);
  39.     DrawString('Testarneshatt');
  40.     MoveTo(10, 40 + 50);
  41.     if ADrawString('Testarneshatt') <> noErr then
  42.         SysBeep(1);
  43.  
  44.     while not Button do
  45.         ;
  46. end.